home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 65 / 065.d81 / speed basic (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  5KB  |  162 lines

  1. 3 poke53280,1:poke53281,1:poke646,5:clr:print"[147]"chr$(14)chr$(8)
  2. 5 gosub60100:goto430
  3. 9 :
  4. 10 rem====press any key prompt=======
  5. 11 :
  6. 12 x=13:y=24:w$="[144][208]ress any key[145][145][145]":gosub66
  7. 14 geta$:ifa$=""then14
  8. 15 return
  9. 63 :
  10. 64 rem========print at=======
  11. 65 :
  12. 66 poke 783,peek(783)and254:poke782,x:poke781,y:sys65520:printw$
  13. 67 poke783,peek(783)or1:return
  14. 68 z9=ti:fori=1toz:next:z8=ti
  15. 69 w$="[197]mpty [204]oop":return
  16. 72 z9=ti:fori=1toz:a=z:next:z8=ti
  17. 73 w$="[193]=[218]       ":return
  18. 76 z9=ti:fori=1toz:a=100:next:z8=ti
  19. 77 w$="[193]=100     ":return
  20. 80 z9=ti:fori=1toz:a=z/50:next:z8=ti
  21. 81 w$="[193]=[218]/50    ":return
  22. 84 z9=ti:fori=1toz:a=z*.02:next:z8=ti
  23. 85 w$="[193]=[218]*.02   ":return
  24. 88 z9=ti:fori=1toz:a=z/.02:next:z8=ti
  25. 89 w$="[193]=[218]/.02   ":return
  26. 96 z9=ti:fori=1toz:a=z*z7:next:z8=ti
  27. 97 w$="[193]=[218]*[218]7 (50)":return
  28. 100 z9=ti:fori=1toz:a=z*z6:next:z8=ti
  29. 101 w$="[193]=[218]*[218]6 (.02)":return
  30. 108 z9=ti:fori=1toz
  31. 109 rem this is a typical long rem          statement for timing purposes only
  32. 110 next
  33. 111 z8=ti:w$="[210][197][205][160]statement":return
  34. 131 :
  35. 132 rem ==== diskread subroutine ======
  36. 133 :
  37. 134 l=len(f$):rem f$=name of ssfile
  38. 136 b=951:pokeb,l+2:pokeb+l+1,44:pokeb+2+l,80
  39. 138 fori=0tol-1:pokeb+1+i,asc(mid$(f$,i+1,1)):next
  40. 139 print"[147] ";
  41. 140 poke909,1:rem poke speed here
  42. 142 sys828
  43. 144 return
  44. 346 :
  45. 347 rem ====variable demo========
  46. 348 :
  47. 350 f$="vd":gosub134:gosub12:clr:dimz9,z8,i,a
  48. 355 print"[147]         [211][201][205][208][204][197] [214][193][210][201][193][194][204][197] [196][197][205][207]"
  49. 360 printtab(24)"[198]irst"tab(32)"[211]econd"
  50. 365 print"    [211]tart of variables[129]"tab(24)peek(45)+256*peek(46)
  51. 370 print"    [197]nd of variables[129]"tab(24)peek(47)+256*peek(48)-1
  52. 375 z=100:z7=50:z6=.02:deffna(x)=z7*z6-z*z7
  53. 380 print:fork=1to9
  54. 385 onkgosub68,72,76,80,84,88,96,100,108
  55. 390 printtab(6)""w$;tab(25);"[129]";z8-z9
  56. 395 next
  57. 400 clr:dimz9,z8,i,a
  58. 401 dim a1,a2,a3,a4,a5,a6,a7,a8,a9,a0,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak
  59. 402 dimb1,b2,b3,b4,b5,b6,b7,b8,b9,b0,c1,c2,c3,c4,c5,c6,c7,c8,c9,c0,d1,d2,d3,d4
  60. 403 dimd5,d6,d7,d8,d9,d0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e0,f1,f2,f3,f4,f5,f6,f7,f8
  61. 404 dimf9,f0,g1,g2,g3,g4,g5,g6,g7,g8,g9,g0,h1,h2,h3,h4,h5,h6,h7,h8,h9,h0
  62. 405 k=1:z=100:z7=50:z6=.02:deffna(x)=z7*z6-z*z7
  63. 408 print"[129]"
  64. 410 printtab(32)peek(45)+256*peek(46)
  65. 411 printtab(32)peek(47)+256*peek(48)-1
  66. 412 print:fork=1to9
  67. 414 onkgosub68,72,76,80,84,88,96,100,108
  68. 416 printtab(33)z8-z9
  69. 418 next
  70. 419 print" [206]otice that when the variable [129][218] is"
  71. 420 print" added (in the [211]econd run), the time"
  72. 421 print" to go through the loops is appreciably  increased."
  73. 422 gosub12
  74. 424 print"[147]":f$="vc":gosub134:gosub12
  75. 427 :
  76. 428 rem ========menu===================
  77. 429 :
  78. 430 print"[147]     [193] [196][197][205][207][206][211][212][210][193][212][201][207][206] [207][198] [212][200][197] [211][208][197][197][196] [207][198]
  79. 431 [153]"   str$right$(NULL)val(NULL)(NULL)right$(NULL)(NULL)right$(NULL)chr$ atn(NULL)str$ str$valascright$(NULL)right$(NULL)chr$ (NULL)atn(NULL)right$atnpeek(NULL)val(NULL)"
  80. 432 [153][163]12)"clrby (NULL)aurice mid$ones"
  81. 433 [153]"             (NULL)left$valcloseasc(NULL)(NULL)(NULL) close(NULL)'(NULL)closeclose"
  82. 434 [153]"         stop1. (NULL)un (NULL)atn(NULL)right$atnpeek(NULL)val demo"
  83. 435 [153]"         stop2. (NULL)un atn(NULL)(NULL)atn(NULL) demo"
  84. 436 [153]"         stop3. (NULL)ead methodology"
  85. 438 [153]"         stop4. (NULL)eturn to (NULL)(NULL)atnstr$(NULL)(NULL)atn(NULL)"
  86. 439 [153]"           for(NULL)lease choose an (NULL)  "
  87. 440 [141]14:[139]a$[179]"1"[176]a$[177]"4"[167][141]14
  88. 444 [145] [197](a$)[137]350,500,600,60000
  89. 496 :
  90. 497 [143] ====array demo======
  91. 498 :
  92. 500 f$[178]"ad":[141]134:[141]12
  93. 501 [153]"loadstop            atn(NULL)(NULL)atn(NULL) (NULL)atn(NULL)right$atnpeek(NULL)val str$val(NULL)(NULL)"
  94. 502 [153][163]20)"#1     #2     #3"
  95. 503 [156]:[134]a(20,50),s,f,b(20,50),c(20,50),d(20,50)
  96. 510 [153]" (NULL)tart of arraysfor"[163]18)[194](47)[170]256[172][194](48)
  97. 512 [153]" valnd of arraysfor"[163]18)[194](49)[170]256[172][194](50)[171]1
  98. 516 s[178]ti:a[178]3:f[178]ti:[153]" atndd new variablefor"[163]19)f[171]s
  99. 518 s[178]ti:b[178]3:f[178]ti:[153]" atndd anotherfor"[163]19)f[171]s
  100. 520 [151]214,12:[153]:[153]"stop #1 - str$efining variables after defining
  101. 522 print"      4000 array variables"
  102. 524 fort=1to2000:next:clr
  103. 526 dimrq%(308),m%(11),f$(11),g$(11),p%(11),pp%(13),y%(11),u%(11),hs%(11,4)
  104. 528 dim na$(11,4),mh%(3)
  105. 530 print"[129]"
  106. 532 printtab(25)peek(47)+256*peek(48)
  107. 534 print:printtab(25)peek(49)+256*peek(50)-1
  108. 536 s=ti:a=3:f=ti:print:printtab(27)f-s
  109. 538 s=ti:b=3:f=ti:print:printtab(27)f-s
  110. 540 poke214,15:print:print"[144] #2 - [196]efining variables after defining"
  111. 542 print"      1202 [201][206][212][197][199][197][210] array variables"
  112. 544 fort=1to2000:next:clr
  113. 546 dimrq(308),m%(11),f$(11),g$(11),p%(11),pp%(13),y%(11),u%(11),hs%(11,4)
  114. 548 dim na$(11,4),mh%(3)
  115. 550 print"[129]"
  116. 552 printtab(32)peek(47)+256*peek(48)
  117. 554 print:printtab(32)peek(49)+256*peek(50)-1
  118. 556 s=ti:a=3:f=ti:print:printtab(34)f-s
  119. 558 s=ti:b=3:f=ti:print:printtab(34)f-s
  120. 560 poke214,18:print:print"[144] #3 - [196]efining variables after defining"
  121. 562 print"      1202 [210][197][193][204] array variables"
  122. 580 gosub12:goto430
  123. 596 :
  124. 597 rem =====read explanation=====
  125. 598 :
  126. 600 print"[147]"
  127. 604 f$="ex1":gosub134:gosub12:f$="ex2":print"[147]":gosub134:gosub12:goto430
  128. 997 :
  129. 998 rem ====scratch and save====
  130. 999 :
  131. 10000 open15,8,15,"s0:speed basic":close15:save"speed basic",8:end
  132. 50097 :
  133. 50098 rem==reconnect and load reader===
  134. 50099 :
  135. 60000 open15,8,15,"r0:hello connect=hello connect":input#15,er:close15
  136. 60010 if er<>63 then print"[147]":end
  137. 60020 a$="hello connect":q$=chr$(34)
  138. 60030 print"[147]load"q$a$q$",8"
  139. 60040 print"run":poke631,13:             poke632,13:poke198,2:end
  140. 60100 fori=828to969:reada:pokei,a:next:return
  141. 60102 data 173,183,003,162,184,160,003
  142. 60104 data 032,189,255,169,001,162,008
  143. 60106 data 160,000,032,186,255,032,192
  144. 60108 data 255,162,001,032,198,255,032
  145. 60110 data 207,255,032,207,255,032,207
  146. 60112 data 255,141,059,003,032,183,255
  147. 60114 data 041,064,208,068,173,059,003
  148. 60116 data 201,128,176,236,173,059,003
  149. 60118 data 201,064,176,033,173,059,003
  150. 60120 data 201,031,144,034,173,059,003
  151. 60122 data 201,031,240,035,173,059,003
  152. 60124 data 032,210,255,162,020,160,000
  153. 60126 data 136,208,253,202,208,248,076
  154. 60128 data 093,003,173,059,003,105,127
  155. 60130 data 076,137,003,173,059,003,105
  156. 60132 data 064,076,137,003,169,013,076
  157. 60134 data 137,003,169,001,032,195,255
  158. 60136 data 032,204,255,096,007,066,076
  159. 60138 data 085,082,066,044,080,048,048
  160. 60140 data 048,048,048,048,048,048,048
  161. 60142 data 048,048
  162.